package com.healthy.education.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.healthy.education.mapper.ArticleCategoriesMapper;
import com.healthy.education.domain.ArticleCategories;
import com.healthy.education.service.IArticleCategoriesService;

/**
 * 文章分类Service业务层处理
 * 
 * @author 束伟
 * @date 2024-03-29
 */
@Service
public class ArticleCategoriesServiceImpl implements IArticleCategoriesService 
{
    @Autowired
    private ArticleCategoriesMapper articleCategoriesMapper;

    /**
     * 查询文章分类
     * 
     * @param id 文章分类主键
     * @return 文章分类
     */
    @Override
    public ArticleCategories selectArticleCategoriesById(Long id)
    {
        return articleCategoriesMapper.selectArticleCategoriesById(id);
    }

    /**
     * 查询文章分类列表
     * 
     * @param articleCategories 文章分类
     * @return 文章分类
     */
    @Override
    public List<ArticleCategories> selectArticleCategoriesList(ArticleCategories articleCategories)
    {
        return articleCategoriesMapper.selectArticleCategoriesList(articleCategories);
    }

    /**
     * 新增文章分类
     * 
     * @param articleCategories 文章分类
     * @return 结果
     */
    @Override
    public int insertArticleCategories(ArticleCategories articleCategories)
    {
        return articleCategoriesMapper.insertArticleCategories(articleCategories);
    }

    /**
     * 修改文章分类
     * 
     * @param articleCategories 文章分类
     * @return 结果
     */
    @Override
    public int updateArticleCategories(ArticleCategories articleCategories)
    {
        return articleCategoriesMapper.updateArticleCategories(articleCategories);
    }

    /**
     * 批量删除文章分类
     * 
     * @param ids 需要删除的文章分类主键
     * @return 结果
     */
    @Override
    public int deleteArticleCategoriesByIds(Long[] ids)
    {
        return articleCategoriesMapper.deleteArticleCategoriesByIds(ids);
    }

    /**
     * 删除文章分类信息
     * 
     * @param id 文章分类主键
     * @return 结果
     */
    @Override
    public int deleteArticleCategoriesById(Long id)
    {
        return articleCategoriesMapper.deleteArticleCategoriesById(id);
    }
}
